package com.chansos.dubbogo.project_generator;

import com.intellij.openapi.module.ModuleTypeManager;
import icons.PluginIcons;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

public class GoModuleType extends com.intellij.openapi.module.ModuleType<GoModuleBuilder> {
    public static final String ID = "GO_MODULE";
    public static final GoModuleType INSTANCE = (GoModuleType) ModuleTypeManager.getInstance().findByID(ID);

    protected GoModuleType() {
        super(ID);
    }

    @Override
    public @NotNull
    GoModuleBuilder createModuleBuilder() {
        return new GoModuleBuilder();
    }

    @Override
    public @NotNull
    @Nls(capitalization = Nls.Capitalization.Title)
    String getName() {
        return "Dubbo Go Project";
    }

    @Override
    public @NotNull
    @Nls(capitalization = Nls.Capitalization.Sentence)
    String getDescription() {
        return "Dubbo go module";
    }

    @Override
    public @NotNull
    Icon getNodeIcon(boolean isOpened) {
        return PluginIcons.Module_Icon;
    }
}
